/*  CMPE131: PERRY AIR RESERVATION SYSTEM
  
  Group 1:  Shane Loretz, Parag Pardeshi, Tom Pham,
  Bryan Radford, Rohini Thakar
  
  This program is to handle flight reservations for an airline.
*/
                                  
#include "reservation.h"
int Reservation::nextId = 0;

Reservation::Reservation()
   {
   //generate blank reservation
   id = nextId++;
   flight = 0;
   }
Reservation::Reservation(string rowFromCsv)
   {
   //TODO parse the csv row;
   }
Reservation::~Reservation()
   {
   //Intentionally blank
   }

string Reservation::getFirstName()
   {
   return firstName;
   }
string Reservation::getLastName()
   {
   return lastName;
   }
string Reservation::getDateOfBirth()
   {
   return dateOfBirth;
   }
string Reservation::getPhoneNumber()
   {
   return phoneNumber;
   }
Flight Reservation::getFlight()
   {
   return *flight;
   }
int Reservation::getNumbags()
   {
   return numBags;
   }
bool Reservation::isDisabled()
   {
   return needsAssistance;
   }

void Reservation::setName(string _first, string _last)
   {
   firstName = _first;
   lastName = _last;
   }
void Reservation::setDateOfBirth(string _dateOfBirth)
   {
   dateOfBirth = _dateOfBirth;
   }
void Reservation::setPhoneNumber(string phoneNum)
   {
   phoneNumber = phoneNum;
   }
void Reservation::setFlight(Flight *_flight)
   {
   flight = _flight;
   }
void Reservation::setNumBags(int num)
   {
   numBags = num;
   }
void Reservation::setNeedsAssistance(bool isDisabled)
   {
   needsAssistance = isDisabled;
   }

void makeConfirmation()
   {
   //TODO
   //also write to disk (we've finalized the reservation)
   }
